package com.czy.owner.adapter;

import android.content.Context;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.czy.owner.R;
import com.czy.owner.entity.CarBrandModel;
import com.czy.owner.entity.WheelAttrModel;
import com.easyrecycleview.adapter.BaseViewHolder;
import com.easyrecycleview.adapter.RecyclerArrayAdapter;

/**
 * Created by Raven on 2017/12/22.
 */

public class CarBrandAttrAdapter extends RecyclerArrayAdapter<CarBrandModel> {


        private Context context;

        public CarBrandAttrAdapter(Context context) {
            super(context);
            this.context = context;
        }


        @Override
        public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
            return new CarBrandAttrHolder(parent);
        }

        class CarBrandAttrHolder extends BaseViewHolder<CarBrandModel> {
            private TextView item_tv_text;
            public CarBrandAttrHolder(ViewGroup parent) {
                super(parent, R.layout.item_car_brand_attr);
                item_tv_text = $(R.id.item_tv_text);
            }

            @Override
            public void setData(final CarBrandModel model) {
                super.setData(model);
                item_tv_text.setText(""+model.getChName());
            }
        }

}
